<#import "/spring.ftl" as spring />
<html>
<head>
	<title>payment</title>
</head>
<body>
<div id="content">

	<span class="error">${RequestParameters.message!}</span>

	<h1>PAYMENT DETAILS</h1>

	<table>
	<tr>
		<td>CREATED</td>
		<td>${payment.createdTime}</td>
	</tr>
	<tr>
		<td>MODIFIED</td>
		<td>${payment.lastModifiedTime}</td>
	</tr>
	<tr>
		<td>PAYMENT METHOD</td>
		<td>${payment.paymentMethod}</td>
	</tr>
	<tr>
		<td>PAYMENT SOURCE TYPE</td>
		<td>${payment.paymentSourceType}</td>
	</tr>
	<tr>
		<td>AMOUNT</td>
		<td>${payment.amount}</td>
	</tr>
	<tr>
		<td>PAYMENT INVOICE NUMBER</td>
		<td>${payment.paymentInvoiceNumber}</td>
	</tr>
	<tr>
		<td>CONFIRMED STATUS</td>
		<td>${payment.confirmedStatus}</td>
	</tr>
	</table>
	
	<h3>RELATED ITEMS</h3>
	<table>
	<#list payment.lineItems as item>
	<tr>
		<#if payment.paymentSourceType == "INSPECTION">
			<td><a href="inspection.html?id=${item.paymentSourceId}">${payment.paymentSourceType}</a></td>
		<#else>
			<td><a href="billing/invoiceDetail.html?id=${item.paymentSourceId}">${payment.paymentSourceType}</a></td>
		</#if>
	</tr>
	</#list>
	</table>	

</div>	
</body>
</html>
